Geo-fencing is a technology for monitoring a relationship between a mobile device and a specific geographic area and providing an information service according to the relationship. The specific geographic area is determined by a geo-fence. A process for implementing geo-fencing is as follows. First, establish a geo-fence, next, start real-time positioning, then, compare a coordinate of the geo-fence with a coordinate of a positioning result to determine whether a mobile device is located inside or outside the geo-fence, and at last, perform a corresponding operation according to a determining result, such as sending a reminder and a warning message or displaying a positioning point on a map.
The coordinate of the geo-fence and the coordinate of the positioning result both use a same coordinate system. However, in an actual application, a coordinate system of the geo-fence is often inconsistent with that of the positioning result, and there is a relatively large deviation. For example, when a user establishes a geo-fence by taking points directly from a map using a GCJ02, BD09, or BD09LL coordinate system and uses a Global Positioning System (GPS) as a positioning technology, the coordinate system of the geo-fence is different from a coordinate system WGS84 used by a positioning result obtained using the GPS.
As regards the foregoing problem, the other approaches provide another method for implementing geo-fencing, where coordinate systems that may be respectively used by a geo-fence and a positioning result are directly stipulated, and conversion between coordinate systems is implemented inside. Each time positioning is successful, a coordinate of the positioning result is converted into a coordinate in the coordinate system used by the geo-fence, and then the coordinate, of the positioning result, that is obtained by means of the conversion are compared with the coordinate of the geo-fence. However, in this method, a positioning result may be obtained at intervals each time geo-fencing is started (for example, a positioning result is obtained every 20 seconds). Because coordinate conversion needs to be performed on each positioning result and subsequently a coordinate, of each positioning result, that is obtained by means of the conversion is compared with a coordinate of a geo-fence, a whole operation process is complicated, causing relatively large power consumption for implementing geo-fencing.